package com.my.test.design.chainofresponsibility;

public class Director extends Leader{
    public Director(String name) {
        super(name);
    }

    @Override
    public void handRequest(Request request) {

        if (request.getDays()>2 && request.getDays()<5){
            System.out.println("I agree:"+this.getName());
        } else {
            this.setNextLeader(new Boss("李校长"));
            this.getNextLeader().handRequest(request);
        }
    }

}
